package com.lsk.service;

import com.lsk.internalcommon.DTO.Car;
import com.lsk.internalcommon.DTO.ResponseResult;
import com.lsk.internalcommon.request.ApiDriverPoint;
import com.lsk.remote.ServiceDriverUserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PointService {
    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    public ResponseResult upload(ApiDriverPoint apiDriverPoint){
        //根据传递的carid获取到数据表中的tid和trid
        Long carId = apiDriverPoint.getCarId();
        ResponseResult<Car> result = serviceDriverUserClient.getCarById(carId);
        Car car = result.getData();
        String tid = car.getTid();
        String trid = car.getTrid();

        //调用service-map上传轨迹
        return ResponseResult.success("1111");
    }
}
